package _base0to1;

/**
 * 242. 有效的字母异位词
 */
public class No242 {
    public boolean isAnagram(String s, String t) {
        char[] chars = new char[26];
        for (char c : s.toCharArray()) chars[c - 'a']++;
        for (char c : t.toCharArray()) chars[c - 'a']--;
        for (char c : chars) if (c != 0) return false;
        return true;
    }
}
